﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="MemberMaster.Master"
    CodeBehind="Message_Send.aspx.cs" Inherits="WinnerCMS.WebUI.Templates.WinnerCMS6.Member.Message_Send" %>

<asp:Content ID="Content" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">

        function CheckUserName() {
            var u = $('#<%=txtIncept.ClientID%>').val();
            if (u == "") return;
            $.ajax({
                type: "get",
                url: "/api/User/CheckUserName?username=" + escape(u),
                success: function (res) {
                    if (true == res) {
                        alert("这个用户名存在。可以发短信。");
                    }
                    else {
                        alert("注意！这个用户名不存在，不能发短信。");
                    }
                }
            });
        }
    </script>
    <style type="text/css">
        .maintable {
            border-style: dotted;
        }
    </style>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <table align="center" cellpadding="3" cellspacing="3" width="98%">
            <tr>
                <td align="right" width="12%">收件人：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtIncept" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="请输入"
                        ControlToValidate="txtIncept"></asp:RequiredFieldValidator>
                    <ajaxToolkit:AutoCompleteExtender ID="autoComplete1" runat="server" CompletionInterval="1000"
                        CompletionSetCount="12" EnableCaching="true" MinimumPrefixLength="2" ServiceMethod="GetCompletionList"
                        ServicePath="FindMember.asmx" TargetControlID="txtIncept">
                    </ajaxToolkit:AutoCompleteExtender>
                </td>
                <td id="CheckRow" runat="server" align="left">
                    <input id="btnCheck" onclick="CheckUserName();" class="btn" type="button" value="检查用户名" />
                </td>
            </tr>
            <tr>
                <td align="right">标题：
                </td>
                <td align="left" colspan="2">
                    <asp:TextBox ID="txtTitle" runat="server" Width="331px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="请输入"
                        ControlToValidate="txtTitle"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr id="PassCodeRow" runat="server">
                <td align="right">&nbsp;</td>
                <td align="left">
                    <asp:Button ID="btnSend" runat="server" OnClick="btnSend_Click" Text="发送" CssClass="btn" />
                </td>
                <td align="left" width="53%">&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtContent"
                    ErrorMessage="请输入短信内容"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="3" nowrap="nowrap">
                    <asp:TextBox ID="txtContent" runat="server" Height="300px" Width="100%" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
        </table>
    </form>
</asp:Content>
